package com.sky.controller.user;

import com.sky.pojo.Setmeal;
import com.sky.result.Result;
import com.sky.service.user.UserSetMealService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Slf4j
@Api(tags = "用户端套餐相关接口")
@RequiredArgsConstructor
public class UserSetMealController {
    private final UserSetMealService userSetMealService;
    @ApiOperation("获取套餐详情")
    @GetMapping("/user/setmeal/list")
    public Result<List<Setmeal>> list(@RequestParam Long categoryId){
        log.info("获取套餐详情，categoryId:{}",categoryId);
        List<Setmeal> list=userSetMealService.list(categoryId);
        return Result.success(list);
    }
}
